<h1>Ofertas</h1>
<?php echo $this->Html->link('Adicionar oferta',array('controller' => 'ofertas', 'action' => 'add'), array('class'=>'btn btn-default pull-right'))?>
<table class="table">
  <thead>
    <tr>
        <th>Nome</th>
        <th>Data Início</th>
        <th>Data Fim</th>
        <th>Tipo de Oferta</th>
        <th>Ações</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($ofertas as $oferta): ?>
    <tr>
        <td>
            <?php echo $this->Html->link($oferta['Oferta']['nome'], array('controller' => 'ofertas', 'action' => 'view', $oferta['Oferta']['id'])); ?>
        </td>
        <td><?php echo $oferta['Oferta']['dt_inicio']; ?></td>
        <td><?php echo $oferta['Oferta']['dt_fim']; ?></td>
        <td><?php echo $oferta['TipoOferta']['nome']; ?></td>
        <td>
            <?php echo $this->Html->link('Remover', array('action' => 'delete', $oferta['Oferta']['id']), array('class'=>'btn btn-default'), 'Deseja remover?' )?>
            <?php echo $this->Html->link('Editar', array('action'=>'edit', $oferta['Oferta']['id']), array('class'=>'btn btn-default'));?>
        </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
